package com.sumainfor.wx.tenant.controller.rentadviser;

import com.alibaba.fastjson.JSONObject;
import com.sumainfor.common.config.RedisUtils;
import com.sumainfor.common.util.*;
import com.sumainfor.common.wechat.WeChatConfig;
import com.sumainfor.common.wechat.WxConstant;
import com.sumainfor.common.wechat.WxEncodeUtil;
import com.sumainfor.common.wechat.weUtil.WXPayConstants;
import com.sumainfor.common.wechat.weUtil.WXPayUtil;
import com.sumainfor.wx.tenant.feign.Zfeign.ZpcEpcFeign;
import com.sumainfor.wx.tenant.feign.Zfeign.ZpcGmioFeign;
import com.sumainfor.wx.tenant.feign.Zfeign.ZpcMktFeign;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 微信支付相关
 */
@RestController
@RequestMapping("/rentadviser/RdWxPay")
public class RdWxPayController implements Serializable {
    Logger log = LoggerFactory.getLogger(RdWxPayController.class);// 日志

    @Autowired
    private ZpcGmioFeign zpcGmioFeign;
    /**
     * 微信统一下单（生成预付订单）
     */
    @PostMapping("/getUnifiedorder")
    public JsonResult getUnifiedorder(@RequestBody Map<String,Object>params) {
        return zpcGmioFeign.getUnifiedorder(params);
    }
    /**
     *续签合同的时候把上一份合同的账单在微信统一下单的详情
     */
    @PostMapping("/getOrderQuery")
    public JsonResult getOrderQuery(@RequestBody Map<String,Object>params) {
        return zpcGmioFeign.getOrderQuery(params);
    }
}
